package com.xiaozhengkeji.mc.plugins.cdkey.utils;

import java.text.SimpleDateFormat;
import java.util.Date;

public class DaysUtil {

    /**
     * yyyy-MM-dd HH:mm:ss
     * yyyyMMddHHmmss
     */
    public static String getDate() {
        Date day = new Date();
        SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        return df.format(day);
    }

    public static String dateToString(Date day) {
        SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        return df.format(day);
    }
}
